import Vue from 'vue'
import Router from 'vue-router'
import login from '@/views/login'
import home from '@/views/home'
import welcome from '@/views/welcome/welcome'
import users from '@/views/users/users'
import rights from '@/views/rights/rights'
import roles from '@/views/rights/roles'
import goods from '@/views/goods/goods'
import addGood from '@/views/goods/addGood'
import category from '@/views/goods/category'
Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/',
      name: 'home',
      component: home,
      redirect: {path: 'welcome'},
      children: [
        {
          name: 'welcome',
          path: 'welcome',
          component: welcome
        },
        {
          name: 'users',
          path: 'users',
          component: users
        },
        {
          name: 'rights',
          path: 'rights',
          component: rights
        },
        {
          name: 'roles',
          path: 'roles',
          component: roles
        },
        {
          name: 'goods',
          path: 'goods',
          component: goods
        },
        {
          name: 'addGood',
          path: 'addGood',
          component: addGood
        },
        {
          name: 'categories',
          path: 'categories',
          component: category
        }
      ]
    }
  ]
})
